<?php
	include 'dbConnection.php';

	$result = mssql_query("EXECUTE GetKierunki");
	while($row = mssql_fetch_array($result)) {
		echo '<span id="dir_'.$row['id'].'" onclick="getStopnie('.$row['id'].')">'.$row['nazwa'].'</span>';
	}
	
	echo '_!_unique_delimiter_!_';
	
	$result = mssql_query("EXEC GetAllPrzedmioty");
	while($row = mssql_fetch_array($result)) {
		$nazwa = iconv("CP1250","utf-8",$row['nazwa']);
		echo '<span class="subj" id="subj_'.$row['id'].'" onclick="getWyklady('.$row['id'].')">'.$nazwa.'</span>';//<br />';
	}	
	
	mssql_free_result($result);
	mssql_close($con);
?>